﻿#include <iostream>
#include <thread>
#include <chrono>

void slowTask() {
    std::cout << "Start task..." << std::endl;
    std::this_thread::sleep_for(std::chrono::seconds(2)); // 暂停2秒
    std::cout << "End task after delay." << std::endl;
}

int main() {
    std::thread t(slowTask);
    t.join();
    return 0;
}
